Sherlock And Anagrams Python